<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        var score = prompt("请输入一个正整数","");
        var num=1;
			if(score>0){
				for(var i=score;i>0;i--){
					num=num*i;
				}
			}else{
				document.write("请输入一个正整数");
			}
        alert(num);
    </script>
</head>
<body>
    
</body>
</html>